if __name__ == "__main__":
    n = eval(input('请输入评委的个数：'))
    print('请输入每个评委的分数,并以回车键确认：')
    score = []
    for i in range(1, n + 1):
        score.append(eval(input()))

    maxScore = score[0]
    minScore = score[0]
    sumScore = score[0]
    for i in range(1, n):
        sumScore += score[i]
        if score[i] > maxScore:
            maxScore = score[i]
        elif score[i] < minScore:
            minScore = score[i]
    print("最终得分是:" + str((sumScore - maxScore - minScore) / (n - 2)))
